import time
import os

def GenLog(filestr):
    if os.path.exists('.\\log') is False:
        os.mkdir('.\\log')
    filename = 'log\\log' + time.strftime("%Y%m%d%H%M", time.localtime()) + '.txt'
    with open(filename, 'a', encoding='gbk') as file_object:
        file_object.write(filestr)

def GenSQLog(filestr):
    if os.path.exists('.\\log') is False:
        os.mkdir('.\\log')
    filename = 'log\\sqlog' + time.strftime("%Y%m%d%H%M", time.localtime()) + '.txt'
    with open(filename, 'a', encoding='gbk') as file_object:
        file_object.write(filestr)

def GenOALog(filestr):
    if os.path.exists('.\\log') is False:
        os.mkdir('.\\log')
    filename = 'log\\log' + time.strftime("%Y%m%d%H%M", time.localtime()) + '_OA.txt'
    with open(filename, 'a', encoding='gbk') as file_object:
        file_object.write(filestr)
